
/* -----------------
* brief 
* 1. this is code gen by tools 
* 2. array like [a,b,c] after each field, define the ui html tag in view, 
		a for title, 
		b for show or not , (onlyread is trial feature)
		c for element html tag , currently support : check、radio、select、input、textarea、upload
* 3. XXX
*/
//使用方法：在工程root目录下，执行go generate ./modules/user/models
//go:generate legogen -type=WxUser -kv=ModuleName=user,PrjName=saas_sys_base -dirconf=../../.. ./WxUser.go
package user

import "github.com/mjiulee/lego"

func init() {
	lego.AddBeanToSynList(new(WxUser))
}

/* table: "tb_wx_user"
 * -----------------
*/
type WxUser struct {
	Id        int64  `xorm:"pk" json:",string"`                  // ["id","hide","hidden"]
	IfDel     int `xorm:"default 0"` // ["deleted","hide","hidden"]
	Cdate     string `xorm:"DateTime created"`    // ["create","show","datetime"]
	Udate     string `xorm:"DateTime updated"`    // ["update","show","datetime"]
    // add your custom field here

	//
	RegShareid int64  `xorm:"" json:",string"`                    // ["邀请Id","hide","input"]
	OpenId     string `xorm:"varchar(64) unique "` // ["OpenID","hide","input"]
	UnionId    string `xorm:"varchar(64)  "`       // ["UnionId","hide","input"]
	NickName   string `xorm:"varchar(64)  "`       // ["昵称","show","input"]
	Gender     int `xorm:"int"`       // ["性别","show","input"]
	City       string `xorm:"varchar(127) "`       // ["城市","show","input"]
	Province   string `xorm:"varchar(127) "`       // ["省份","show","input"]
	Country    string `xorm:"varchar(127) "`       // ["国家","show","input"]
	AvatarUrl  string `xorm:"varchar(255) "`       // ["头像","show","input"]
	// others
	RealName     string `xorm:"varchar(64)  "` // ["真名","show","input"]
	PhoneNumber       string `xorm:"varchar(64)  "` // ["电话","show","input"]
	Language string `xorm:"varchar(64)  "` // ["用户语言","show","input"]
	//GotRegCoupon int    `xorm:"default 0 "`    // ["已获取首登代金券","show","input"]
	WeappId    string `xorm:"varchar(64)  "`       // ["微信appid","hide","input"]
	SessionKey string `xorm:""` // ["微信appid","hide","input"]
}
